<?php

class PayController extends Controller{
	public $layout = '//layouts/platform_column';
	public function actionNotify() {
		$view = 'error';
		$model = '';
		if(Yii::app()->pay->tenpay->notify) {
			$model = PaymentBill::model()->findByAttributes(array(
				'outer_order_id' => Yii::app()->pay->tenpay->tid
			));
			if (is_object($model)) {
				$model->status = 1;
				$model->save();
				$view = 'sucess';
			}
		
		}
		$this->render($view,array('model' => $model));
	}
	public function actionAplipayNotify() {
		$view = 'error';
		$model = '';
		if(Yii::app()->pay->alipay->notify) {
			$model = PaymentBill::model()->findByAttributes(array(
				'outer_order_id' => Yii::app()->pay->alipay->tid
			));
			if (is_object($model)) {
				$model->status = 1;
				$model->save();
				$view = 'sucess';
			}
		}
		$this->render($view,array('model' => $model));
	}
}

?>